import request from '@/utils/request'
import {
	formatePostParam
} from '@/utils'

const BASE_URL = ''

export function fetchList(query) {
	return request({
		url: `${BASE_URL}/Tree.asmx/CreateTree`,
		method: 'get',
		params: query
	})
}
/**
 * 获取放射源的树
 * @param { Object } query
 * query: {
 * 		type: 'org'
 * }
 */
export function rcimTree(query) {
	return request({
		url: `${BASE_URL}/Tree.asmx/CreateTree`,
		method: 'post',
		params: query
	})
}
/**
 * 获取企业和区域的树
 * @param { Object } query
 * query: {
 * 		type: 'org'
 * }
 */
export function CreateTreeEnterprise(query) {
	return request({
		url: `${BASE_URL}/Tree.asmx/CreateTreeEnterprise`,
		method: 'post',
		params: query
	})
}

export function changePwd(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/PersonLst.asmx/changePwd`,
		method: 'post',
		params: query
	})
}
